package com.kaikeba.spring.beans;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;

@Controller
public class UserController {

	@Value("文章")
	private String name;
	/**
	 * 通过查找系统配置文件获取值方式
	 */
	@Value("${di.username}")
	private String userName;

	public void printName() {
		System.out.println("name:" + name);
	}
	
	public void printUserName(){
		System.out.println(userName);
	}

}
